package com.zzyl.mapper;

import com.github.pagehelper.Page;


import com.zzyl.entity.NursingLevel;
import com.zzyl.vo.NursingLevelVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface NursingLevelMapper {
    Page<NursingLevelVo> selectPage(String name, Integer status);

    @Insert("insert into nursing_level (name, lplan_id, fee, description, create_by, update_by, remark) " +
            "VALUES (#{name},#{lplanId},#{fee},#{description},#{createBy},#{updateBy},#{remark})")
    void insert(NursingLevel nursingLevel);

    /**
     * 根据Id查询回显 同样需要resultMap手动映射
     * @param id
     * @return
     */
    NursingLevelVo getById(Integer id);

    /**
     * 动态新增
     * @param nursingLevel
     */
    void update(NursingLevel nursingLevel);

    /**
     * 根据Id删除
     * @param id
     */
    @Delete("delete from nursing_level where id = #{id}")
    void delById(Integer id);
}
